Conversation
nfultz
left a comment
There was a problem hiding this comment.
Overall lgtm - but I think mediation should be a suggests and not an includes, because it is only used for one design at the moment and not more generally useful.
| importFrom(DeclareDesign,redesign) | ||
| importFrom(DeclareDesign,set_diagnosands) | ||
| importFrom(DeclareDesign,tidy_estimator) | ||
| importFrom(broom,tidy) |
There was a problem hiding this comment.
pull in tidy from generics.
There was a problem hiding this comment.
thank for reviewing!
DESCRIPTION
Outdated
| generics, | ||
| rlang | ||
| rlang, | ||
| mediation, |
There was a problem hiding this comment.
mediation should probably be a suggets and not an imports.
| mediator_regression + stage2_1 + stage2_2 + stage2_3 | ||
| ) | ||
|
|
||
| if(mediation_package){ |
There was a problem hiding this comment.
stopifnot(requireNamespace("mediation"))
R/mediation_analysis_designer.R
Outdated
| # QBA: Quasi-Bayesian Approximation | ||
| e1 <- lm(M ~ Z, data = data) | ||
| e2 <- lm(Y ~ M + Z + M:Z, data = data) | ||
| m <- mediate(e1, e2, sims = 100, treat = "Z", mediator = "M") |
There was a problem hiding this comment.
mediation::mediate and remove import
|
We're getting errror
|
|
PR has been merged, but it's not in the latest cran version, so not sure how generics handles that. When I include importFrom broom,tidy it seems to be working fine, but let me revise again. Sorry, this has been sitting here for so long! |
Description
mediation_analysis_designer with Imai's package feature. Finally!
it needs GitHub's version of broom.
Checklist: